package com.zhangjie.servicedriveruser.controller;

import com.zhangjie.internalcommon.dto.ResponseResult;
import com.zhangjie.servicedriveruser.mapper.DriverUserMapper;
import com.zhangjie.servicedriveruser.service.DriverUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: zj
 * @Date: 2024/2/22 - 02 - 22 - 12:05
 * @Description: com.zhangjie.servicedriveruser.controller
 * @version: 1.0
 */
@RestController
public class TestController {

    @Autowired
    private DriverUserService driverUserService;

    @GetMapping("/test")
    public String test(){
        return "service-driver-user";
    }

    @GetMapping("/test-db")
    public ResponseResult testDb(){
        return driverUserService.testGetUser();
    }

    @Autowired
    DriverUserMapper driverUserMapper;

    @GetMapping("/test-xml")
    public int testXml(String cityCode) {
        int i = driverUserMapper.selectDriverUserCountByCityCode(cityCode);
        return i;
    }
}
